<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'vaga.label', default: 'Vaga')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="cabelistlateral"><img src="${resource(dir:'images',file:'seta_cabecalho_20x20.png')}" /> Detalhes da Vaga</div><br/>
        <div class="body">
            <div class="dialog dadospessoais">
                <g:if test="${flash.message}">
                    <div class="message">${flash.message}</div>
                </g:if>
                <table>
                    <tbody>
                        <tr class="prop">
                            <td class="name"><g:message code="vaga.id.label" default="Código" /></td>
                            <td class="value">${fieldValue(bean: vagaInstance, field: "id")}</td>
                        </tr>
                        <tr class="prop">
                            <td class="name"><g:message code="vaga.cargo.label" default="Cargo" /></td>
                            <td class="value">${fieldValue(bean: vagaInstance, field: "cargo")}</td>
                        </tr>
                        <tr class="prop">
                            <td class="name"><g:message code="vaga.atribuicoes.label" default="Atribuições" /></td>
                            <td class="value">${fieldValue(bean: vagaInstance, field: "atribuicoes")}</td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="vaga.perfil.label" default="Perfil" /></td>
                            <td valign="top" class="value">${fieldValue(bean: vagaInstance, field: "perfil")}</td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="vaga.observacoes.label" default="Observações" /></td
                            <td valign="top" class="value">${fieldValue(bean: vagaInstance, field: "observacoes")}</td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="vaga.remuneracao.label" default="Remuneração" /></td>
                            <td valign="top" class="value">${fieldValue(bean: vagaInstance, field: "remuneracao")}</td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="vaga.dtCadastro.label" default="Data Cadastro" /></td>
                            <td valign="top" class="value"><g:formatDate date="${vagaInstance?.dtCadastro}" /></td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="vaga.qtdeVagas.label" default="Qtde Vagas" /></td>
                            <td valign="top" class="value">${fieldValue(bean: vagaInstance, field: "qtdeVagas")}</td>
                        </tr>
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="vaga.chSemanal.label" default="Carga Horária Semanal" /></td>
                            <td valign="top" class="value">${fieldValue(bean: vagaInstance, field: "chSemanal")}</td>
                        </tr>
                        <tr>
                          <td></td>
                          <td>
                              <form method="post" action="${createLink(controller:'envioVaga', action:'enviarCurriculo')}">
                                  <g:hiddenField name="vaga.id" value="${vagaInstance?.id}" />
                                  <g:hiddenField name="estagiario.id" value="${session.pessoa.id}" />
                                  <g:hiddenField name="dtEnvio" value="${new Date()}" />
                                  <span class="btsalvarcadastro"><input type="submit" name="enviar" value="ENVIAR CURRUCULO"/></span>
                                  <span class="btsalvarcadastro"><input type="button" name="voltar" value="VOLTAR" onclick="location.href='${createLink(controller:'vaga', action:'pesquisar')}';"/></span>
                              </form>
                          </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div class="dadoslateral ui-corner-all">
                <div class="contatos">
                <h1 class="cabelistlateral">Cursos</h1>
                <%
                if(cursoInstanceList){
                    %>
                    <div class="list">
                        <ul>
                          <g:each in="${cursoInstanceList}" status="i" var="cursoInstance">
                            <li>${fieldValue(bean: cursoInstance, field: "descricao")}</li>
                          </g:each>
                        </ul>
                    </div>
                    <%
                }else{
                    %>
                    <div class="list">Não há cursos.</div>
                    <%
                }
                %>
                </div>
            </div>
        </div>
        <div class="dadoslateral ui-corner-all">
            <div class="contatos">
            <h1 class="cabelistlateral">Benefícios</h1>
            <%
            if(beneficioInstanceList){
                %>
                <div class="list">
                    <ul>
                    <g:each in="${beneficioInstanceList}" status="i" var="beneficioInstance">
                      <li>${fieldValue(bean: beneficioInstance, field: "descricao")}</li>
                    </g:each>
                    </ul>
                </div>
                <%
            }else{
                %>
                <div class="list">Não há beneficios.</div>
                <%
            }
            %>
          </div>
      </div>
    </body>
</html>
